<?php
namespace app;
include_once('autoloader.php');
include_once('functions.php');

use app\repository\ClazzRepository;
use app\entity\Clazz;
use app\service\TemplateService;

class Test {
    public function test() {
        $clazzRepository = new ClazzRepository();
        $clazz = new Clazz();
        $clazz->name = 'abc';
        $clazz->entranceDate = 20200121;
        $clazz->user->id = 123;
        $clazz->createUser->id = 456;
        $clazz->numberOfStudents = 20;
        $clazzRepository->save($clazz);
    }

    public static function templateServiceTest() {
        return TemplateService::render('test.html');
    }
}

echo Test::templateServiceTest();
